package com.weixinli.beans;

import java.io.Serializable;

public class Diary implements Serializable{
	private int did;//编号
	private int w_uid;//发表人ID
	private String dtime;//发表时间
	private String dcontent;//日志内容
	private String dstatus;//权限  所有人可见  只有自己可见   好友可见
	private int dup;//优先级
	
	private static final long serialVersionUID = 1L;
	
	@Override
	public String toString() {
		return "Diary [did=" + did + ", w_uid=" + w_uid + ", dtime=" + dtime
				+ ", dcontent=" + dcontent + ", dstatus=" + dstatus + ", dup="
				+ dup + "]";
	}

	public int getDid() {
		return did;
	}

	public void setDid(int did) {
		this.did = did;
	}

	public int getW_uid() {
		return w_uid;
	}

	public void setW_uid(int w_uid) {
		this.w_uid = w_uid;
	}

	public String getDtime() {
		return dtime;
	}

	public void setDtime(String dtime) {
		this.dtime = dtime;
	}

	public String getDcontent() {
		return dcontent;
	}

	public void setDcontent(String dcontent) {
		this.dcontent = dcontent;
	}

	public String getDstatus() {
		return dstatus;
	}

	public void setDstatus(String dstatus) {
		this.dstatus = dstatus;
	}

	public int getDup() {
		return dup;
	}

	public void setDup(int dup) {
		this.dup = dup;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((dcontent == null) ? 0 : dcontent.hashCode());
		result = prime * result + did;
		result = prime * result + ((dstatus == null) ? 0 : dstatus.hashCode());
		result = prime * result + ((dtime == null) ? 0 : dtime.hashCode());
		result = prime * result + dup;
		result = prime * result + w_uid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Diary other = (Diary) obj;
		if (dcontent == null) {
			if (other.dcontent != null)
				return false;
		} else if (!dcontent.equals(other.dcontent))
			return false;
		if (did != other.did)
			return false;
		if (dstatus == null) {
			if (other.dstatus != null)
				return false;
		} else if (!dstatus.equals(other.dstatus))
			return false;
		if (dtime == null) {
			if (other.dtime != null)
				return false;
		} else if (!dtime.equals(other.dtime))
			return false;
		if (dup != other.dup)
			return false;
		if (w_uid != other.w_uid)
			return false;
		return true;
	}

	public Diary(int did, int w_uid, String dtime, String dcontent,
			String dstatus, int dup) {
		super();
		this.did = did;
		this.w_uid = w_uid;
		this.dtime = dtime;
		this.dcontent = dcontent;
		this.dstatus = dstatus;
		this.dup = dup;
	}

	public Diary() {
		super();
	}
}
